3.7 \(\int \frac{\sec ^3(x)}{i+\cot (x)} \, dx\)

Optimal. Leaf size=22 \[ \sec (x)+\frac{1}{2} i \tanh ^{-1}(\sin (x))-\frac{1}{2} i \tan (x) \sec (x) \]

[Out]

(I/2)*ArcTanh[Sin[x]] + Sec[x] - (I/2)*Sec[x]*Tan[x]

________________________________________________________________________________________

Rubi [A]  time = 0.148243, antiderivative size = 22, normalized size of antiderivative = 1., number of steps used = 8, number of rules used = 7, integrand size = 13, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.538, Rules used = {3518, 3108, 3107, 2606, 8, 2611, 3770} \[ \sec (x)+\frac{1}{2} i \tanh ^{-1}(\sin (x))-\frac{1}{2} i \tan (x) \sec (x) \]

Antiderivative was successfully verified.

[In]

Int[Sec[x]^3/(I + Cot[x]),x]

[Out]

(I/2)*ArcTanh[Sin[x]] + Sec[x] - (I/2)*Sec[x]*Tan[x]

Rule 3518

Int[sin[(e_.) + (f_.)*(x_)]^(m_.)*((a_) + (b_.)*tan[(e_.) + (f_.)*(x_)])^(n_.), x_Symbol] :> Int[(Sin[e + f*x]
^m*(a*Cos[e + f*x] + b*Sin[e + f*x])^n)/Cos[e + f*x]^n, x] /; FreeQ[{a, b, e, f}, x] && IntegerQ[(m - 1)/2] &&
 ILtQ[n, 0] && ((LtQ[m, 5] && GtQ[n, -4]) || (EqQ[m, 5] && EqQ[n, -1]))

Rule 3108

Int[cos[(c_.) + (d_.)*(x_)]^(m_.)*sin[(c_.) + (d_.)*(x_)]^(n_.)*(cos[(c_.) + (d_.)*(x_)]*(a_.) + (b_.)*sin[(c_
.) + (d_.)*(x_)])^(p_), x_Symbol] :> Dist[a^p*b^p, Int[(Cos[c + d*x]^m*Sin[c + d*x]^n)/(b*Cos[c + d*x] + a*Sin
[c + d*x])^p, x], x] /; FreeQ[{a, b, c, d, m, n}, x] && EqQ[a^2 + b^2, 0] && ILtQ[p, 0]

Rule 3107

Int[cos[(c_.) + (d_.)*(x_)]^(m_.)*sin[(c_.) + (d_.)*(x_)]^(n_.)*(cos[(c_.) + (d_.)*(x_)]*(a_.) + (b_.)*sin[(c_
.) + (d_.)*(x_)])^(p_.), x_Symbol] :> Int[ExpandTrig[cos[c + d*x]^m*sin[c + d*x]^n*(a*cos[c + d*x] + b*sin[c +
 d*x])^p, x], x] /; FreeQ[{a, b, c, d, m, n}, x] && IGtQ[p, 0]

Rule 2606

Int[((a_.)*sec[(e_.) + (f_.)*(x_)])^(m_.)*((b_.)*tan[(e_.) + (f_.)*(x_)])^(n_.), x_Symbol] :> Dist[a/f, Subst[
Int[(a*x)^(m - 1)*(-1 + x^2)^((n - 1)/2), x], x, Sec[e + f*x]], x] /; FreeQ[{a, e, f, m}, x] && IntegerQ[(n -
1)/2] &&  !(IntegerQ[m/2] && LtQ[0, m, n + 1])

Rule 8

Int[a_, x_Symbol] :> Simp[a*x, x] /; FreeQ[a, x]

Rule 2611

Int[((a_.)*sec[(e_.) + (f_.)*(x_)])^(m_.)*((b_.)*tan[(e_.) + (f_.)*(x_)])^(n_), x_Symbol] :> Simp[(b*(a*Sec[e
+ f*x])^m*(b*Tan[e + f*x])^(n - 1))/(f*(m + n - 1)), x] - Dist[(b^2*(n - 1))/(m + n - 1), Int[(a*Sec[e + f*x])
^m*(b*Tan[e + f*x])^(n - 2), x], x] /; FreeQ[{a, b, e, f, m}, x] && GtQ[n, 1] && NeQ[m + n - 1, 0] && Integers
Q[2*m, 2*n]

Rule 3770

Int[csc[(c_.) + (d_.)*(x_)], x_Symbol] :> -Simp[ArcTanh[Cos[c + d*x]]/d, x] /; FreeQ[{c, d}, x]

Rubi steps

\begin{align*} \int \frac{\sec ^3(x)}{i+\cot (x)} \, dx &=-\int \frac{\sec ^2(x) \tan (x)}{-\cos (x)-i \sin (x)} \, dx\\ &=i \int \sec ^2(x) (-i \cos (x)-\sin (x)) \tan (x) \, dx\\ &=i \int \left (-i \sec (x) \tan (x)-\sec (x) \tan ^2(x)\right ) \, dx\\ &=-\left (i \int \sec (x) \tan ^2(x) \, dx\right )+\int \sec (x) \tan (x) \, dx\\ &=-\frac{1}{2} i \sec (x) \tan (x)+\frac{1}{2} i \int \sec (x) \, dx+\operatorname{Subst}(\int 1 \, dx,x,\sec (x))\\ &=\frac{1}{2} i \tanh ^{-1}(\sin (x))+\sec (x)-\frac{1}{2} i \sec (x) \tan (x)\\ \end{align*}

Mathematica [B]  time = 0.143061, size = 48, normalized size = 2.18 \[ -\frac{1}{2} i \left ((\tan (x)+2 i) \sec (x)+\log \left (\cos \left (\frac{x}{2}\right )-\sin \left (\frac{x}{2}\right )\right )-\log \left (\sin \left (\frac{x}{2}\right )+\cos \left (\frac{x}{2}\right )\right )\right ) \]

Antiderivative was successfully verified.

[In]

Integrate[Sec[x]^3/(I + Cot[x]),x]

[Out]

(-I/2)*(Log[Cos[x/2] - Sin[x/2]] - Log[Cos[x/2] + Sin[x/2]] + Sec[x]*(2*I + Tan[x]))

________________________________________________________________________________________

Maple [B]  time = 0.048, size = 84, normalized size = 3.8 \begin{align*}{{\frac{i}{2}} \left ( \tan \left ({\frac{x}{2}} \right ) +1 \right ) ^{-2}}+{\frac{i}{2}}\ln \left ( \tan \left ({\frac{x}{2}} \right ) +1 \right ) + \left ( \tan \left ({\frac{x}{2}} \right ) +1 \right ) ^{-1}-{{\frac{i}{2}} \left ( \tan \left ({\frac{x}{2}} \right ) +1 \right ) ^{-1}}-{\frac{i}{2}}\ln \left ( \tan \left ({\frac{x}{2}} \right ) -1 \right ) -{{\frac{i}{2}} \left ( \tan \left ({\frac{x}{2}} \right ) -1 \right ) ^{-2}}- \left ( \tan \left ({\frac{x}{2}} \right ) -1 \right ) ^{-1}-{{\frac{i}{2}} \left ( \tan \left ({\frac{x}{2}} \right ) -1 \right ) ^{-1}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(sec(x)^3/(I+cot(x)),x)

[Out]

1/2*I/(tan(1/2*x)+1)^2+1/2*I*ln(tan(1/2*x)+1)+1/(tan(1/2*x)+1)-1/2*I/(tan(1/2*x)+1)-1/2*I*ln(tan(1/2*x)-1)-1/2
*I/(tan(1/2*x)-1)^2-1/(tan(1/2*x)-1)-1/2*I/(tan(1/2*x)-1)

________________________________________________________________________________________

Maxima [B]  time = 1.31561, size = 127, normalized size = 5.77 \begin{align*} \frac{\frac{i \, \sin \left (x\right )}{\cos \left (x\right ) + 1} + \frac{2 \, \sin \left (x\right )^{2}}{{\left (\cos \left (x\right ) + 1\right )}^{2}} + \frac{i \, \sin \left (x\right )^{3}}{{\left (\cos \left (x\right ) + 1\right )}^{3}} - 2}{\frac{2 \, \sin \left (x\right )^{2}}{{\left (\cos \left (x\right ) + 1\right )}^{2}} - \frac{\sin \left (x\right )^{4}}{{\left (\cos \left (x\right ) + 1\right )}^{4}} - 1} + \frac{1}{2} i \, \log \left (\frac{\sin \left (x\right )}{\cos \left (x\right ) + 1} + 1\right ) - \frac{1}{2} i \, \log \left (\frac{\sin \left (x\right )}{\cos \left (x\right ) + 1} - 1\right ) \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sec(x)^3/(I+cot(x)),x, algorithm="maxima")

[Out]

(I*sin(x)/(cos(x) + 1) + 2*sin(x)^2/(cos(x) + 1)^2 + I*sin(x)^3/(cos(x) + 1)^3 - 2)/(2*sin(x)^2/(cos(x) + 1)^2
 - sin(x)^4/(cos(x) + 1)^4 - 1) + 1/2*I*log(sin(x)/(cos(x) + 1) + 1) - 1/2*I*log(sin(x)/(cos(x) + 1) - 1)

________________________________________________________________________________________

Fricas [F]  time = 0., size = 0, normalized size = 0. \begin{align*} \frac{{\left (2 \,{\left (e^{\left (4 i \, x\right )} + 2 \, e^{\left (2 i \, x\right )} + 1\right )} e^{\left (2 i \, x\right )}{\rm integral}\left (\frac{{\left (-11 i \, e^{\left (5 i \, x\right )} - 6 i \, e^{\left (3 i \, x\right )} - 3 i \, e^{\left (i \, x\right )}\right )} e^{\left (-2 i \, x\right )}}{2 \,{\left (e^{\left (6 i \, x\right )} + 3 \, e^{\left (4 i \, x\right )} + 3 \, e^{\left (2 i \, x\right )} + 1\right )}}, x\right ) - e^{\left (3 i \, x\right )} - 3 \, e^{\left (i \, x\right )}\right )} e^{\left (-2 i \, x\right )}}{2 \,{\left (e^{\left (4 i \, x\right )} + 2 \, e^{\left (2 i \, x\right )} + 1\right )}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sec(x)^3/(I+cot(x)),x, algorithm="fricas")

[Out]

1/2*(2*(e^(4*I*x) + 2*e^(2*I*x) + 1)*e^(2*I*x)*integral(1/2*(-11*I*e^(5*I*x) - 6*I*e^(3*I*x) - 3*I*e^(I*x))*e^
(-2*I*x)/(e^(6*I*x) + 3*e^(4*I*x) + 3*e^(2*I*x) + 1), x) - e^(3*I*x) - 3*e^(I*x))*e^(-2*I*x)/(e^(4*I*x) + 2*e^
(2*I*x) + 1)

________________________________________________________________________________________

Sympy [F]  time = 0., size = 0, normalized size = 0. \begin{align*} \int \frac{\sec ^{3}{\left (x \right )}}{\cot{\left (x \right )} + i}\, dx \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sec(x)**3/(I+cot(x)),x)

[Out]

Integral(sec(x)**3/(cot(x) + I), x)

________________________________________________________________________________________

Giac [B]  time = 1.299, size = 77, normalized size = 3.5 \begin{align*} -\frac{i \, \tan \left (\frac{1}{2} \, x\right )^{3} + 2 \, \tan \left (\frac{1}{2} \, x\right )^{2} + i \, \tan \left (\frac{1}{2} \, x\right ) - 2}{{\left (\tan \left (\frac{1}{2} \, x\right )^{2} - 1\right )}^{2}} + \frac{1}{2} i \, \log \left ({\left | \tan \left (\frac{1}{2} \, x\right ) + 1 \right |}\right ) - \frac{1}{2} i \, \log \left ({\left | \tan \left (\frac{1}{2} \, x\right ) - 1 \right |}\right ) \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sec(x)^3/(I+cot(x)),x, algorithm="giac")

[Out]

-(I*tan(1/2*x)^3 + 2*tan(1/2*x)^2 + I*tan(1/2*x) - 2)/(tan(1/2*x)^2 - 1)^2 + 1/2*I*log(abs(tan(1/2*x) + 1)) -
1/2*I*log(abs(tan(1/2*x) - 1))